package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * CropMainProblem generated by hbm2java
 */
@Entity
@Table(name="crop_main_problem"
    ,catalog="madr_bd10"
)
public class CropMainProblem  implements java.io.Serializable {


     private Integer idCroMaiPro;
     private String nameCroMaiPro;
     private boolean statusCroMaiPro;
     private Set productionEventses = new HashSet(0);

    public CropMainProblem() {
    }

	
    public CropMainProblem(String nameCroMaiPro, boolean statusCroMaiPro) {
        this.nameCroMaiPro = nameCroMaiPro;
        this.statusCroMaiPro = statusCroMaiPro;
    }
    public CropMainProblem(String nameCroMaiPro, boolean statusCroMaiPro, Set productionEventses) {
       this.nameCroMaiPro = nameCroMaiPro;
       this.statusCroMaiPro = statusCroMaiPro;
       this.productionEventses = productionEventses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_cro_mai_pro", unique=true, nullable=false)
    public Integer getIdCroMaiPro() {
        return this.idCroMaiPro;
    }
    
    public void setIdCroMaiPro(Integer idCroMaiPro) {
        this.idCroMaiPro = idCroMaiPro;
    }
    
    @Column(name="name_cro_mai_pro", nullable=false, length=45)
    public String getNameCroMaiPro() {
        return this.nameCroMaiPro;
    }
    
    public void setNameCroMaiPro(String nameCroMaiPro) {
        this.nameCroMaiPro = nameCroMaiPro;
    }
    
    @Column(name="status_cro_mai_pro", nullable=false)
    public boolean isStatusCroMaiPro() {
        return this.statusCroMaiPro;
    }
    
    public void setStatusCroMaiPro(boolean statusCroMaiPro) {
        this.statusCroMaiPro = statusCroMaiPro;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="cropMainProblem")
    public Set getProductionEventses() {
        return this.productionEventses;
    }
    
    public void setProductionEventses(Set productionEventses) {
        this.productionEventses = productionEventses;
    }




}


